// 1.引入配置仓库模块
import { defineStore } from "pinia"

interface patientType{ 
    _id: string;
    name:string;
}

// 2.创建导出仓库
export const usePatient =  defineStore('patient', {
    state() { 
        return {
            // 初始化就诊人信息
            patientData: {
                _id: "",
                name:""
            } as patientType
        }
    },
    actions: {
        // 修改就诊人信息
        changePatient(newV:patientType) { 
            this.patientData = newV
            console.log(this.patientData)
        }
    }
})